package com.librelato.negocio;

import java.util.List;

import com.librelato.bean.CentroCustoBean;
import com.librelato.negocio.interfaces.ICentroCustoServico;
import com.librelato.persistencia.CentroCustoDao;
import com.librelato.persistencia.interfaces.ICentroCustoDao;
import com.librelato.persistencia.interfaces.IDaoGenerico;

public class CentroCustoServico<P extends CentroCustoBean> extends ServicoGenerico<P> implements
		ICentroCustoServico<P> {
	
	private final ICentroCustoDao<P> dao;
	
	public CentroCustoServico() {
		this.dao = new CentroCustoDao<P>();
	}
	
	public void excluir(P p) throws Exception {};
	
	public void editar(P p) throws Exception {};

	@Override
	public P salvar(P usuario) {
		return null;
	}

	@Override
	public IDaoGenerico<P> getDao() {
		return this.dao;
	}

	@Override
	public void preSalvar(P p) {}

	@Override
	public void posSalvar(P p) {}

	@Override
	public List<P> buscaCentrosCusto(String filial,String nome, int tipo) throws Exception {
		return this.dao.buscaCentrosCusto(filial,nome, tipo);
	}

	@Override
	public CentroCustoBean verificaCentroCusto(CentroCustoBean centroCusto) throws Exception {
		return this.dao.verificaCentroCusto(centroCusto);
	}


}
